<?php
/**
 * User: YL
 * Date: 2019/6/5
 */

use think\facade\Route;

Route::group('/', function (){
    // 测试
    Route::get('tests', 'Tests@get')->option([
        'controller' => 'tests',
        'method' => 'get',
    ]);
})->prefix('\\app\\index\\controller\\')
    ->setOption('module', 'index')
    ->middleware('api')
    ->allowCrossDomain([
        'Access-Control-Max-Age' => 86400, // 1d
    ]);